﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
	public class NumberAttribut : Attribut
	{

		private double wert;

		public NumberAttribut(string name, double wert)
			: base(name)
		{
			this.Wert = wert;
		}

		public double Wert
		{
			get { return wert; }
			set { wert = value; }
		}


		public bool equals(Object obj)
		{
			if (obj is Double)
			{
				double comp = (double)obj;
				return wert == comp;
			}

			return false;
		}

		public bool bigger(double comp)
		{
			return wert > comp;
		}

		public bool smaller(double comp)
		{
			return wert < comp;
		}

		public override string ToString()
		{
			string returnString = "NumberAttribut: Name=" + base.Name + ", Wert=" + wert;
			return returnString;
		}
	}
}
